#include "global_path_server.hpp"

namespace Planning {
GlobalPathServer::GlobalPathServer()
    : Node("global_path_server_node_cpp")
{
    RCLCPP_INFO(this->get_logger(), "global_path_server_node_cpp created");
}
}

int main(int argc, char* argv[])
{
    rclcpp::init(argc, argv);
    auto logger = rclcpp::get_logger("global_path_server_node_cpp");

    try {
        auto node = std::make_shared<Planning::GlobalPathServer>();
        RCLCPP_INFO(logger, "Startup complete");
        rclcpp::spin(node); // 健康状态下才进入spin循环
        rclcpp::shutdown(); // 正常退出时关闭
    } catch (const std::exception& e) {
        RCLCPP_FATAL(logger, "Unhandled exception: %s", e.what());
    }
    return 0;
}